<script>
	//请求
	// this.$axios({
	// 	url:`user/plot/plotDetail?`,
	// 	method: "post",
	// 	data: {
	// 		id:id
	// 	}
	// }).then((res) => {

	// })

	export default {
		globalData: {
			//定义全局变量以供各个页面使用
			globalFloatBallPosition: {
				x: 360,
				y: 256
			},
		},
		onLaunch: function() {
			console.log('App Launch');

			/* uni.getSetting({
				success(res) {
					if (!res.authSetting['scope.userLocation']) {
						// 未授权
						uni.authorize({
							scope: 'scope.userLocation',
							success() { //1.1 允许授权
								// uni.getLocation()
								uni.getLocation({
								    type: 'wgs84',
									geocode:true,
								    success: function (res) {
										uni.setStorage({
										    key: 'dingwei',
										    data: {
												longitude:res.longitude,
												latitude:res.latitude
											},
										});
										setTimeout(()=>{
											console.log('pages/growVegetables/growVegetables');
											uni.switchTab({
												url:'pages/growVegetables/growVegetables'
											})
										},1000)
								        // console.log('当前位置的经度：' + res.longitude);
								        // console.log('当前位置的纬度：' + res.latitude);
								    }
								});
							},
							fail() { //1.2 拒绝授权
								console.log("您拒绝将不能享受附近的土地服务")
							}
						})
					} else {
						// 已授权 ..(获取位置信息)
					}
				}
			}); */
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},

	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "merchant/iconfont/iconfont.css";
	@import "pageA/static/css/iconfont.css";
	@import "/uni_modules/uview-ui/index.scss";
	@import "pageA/static/css/global.css";
	@import "pageA/static/font/iconfont.css";

	page {
		background-color: #EFEFEF;
	}

	/deep/.u-fade-enter-active.data-v-8e60ec6e,
	.u-fade-leave-active.data-v-8e60ec6e {
		z-index: 999;
	}
</style>
